package com.kemai.designmode.ui
import android.os.Bundle
import com.kemai.common.adapter.ItemClickListener
import com.kemai.common.ui.BaseActivity
import com.kemai.designmode.Facaed.FacadeService
import com.kemai.designmode.R


//外观模式调用(当访问流程比较复杂时，将流程封闭成一个接口，提供外部使用)
class FacadeActivity : BaseActivity(), ItemClickListener {
    private val studyContent = arrayOf("使用外观模式")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_common_content)
        findViewById()
        setTiTle("外观模式")
        setAdapterContent(studyContent,CompositeActivity@this,CompositeActivity@this)
    }

    override fun itemClick(position: Int) {
        when(position){
            0->{
                val facadeService = FacadeService()
                facadeService.dealWithOrder()
            }
        }
    }

}